home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / keyb / d5macs.zip / MACROS.DOC < prev   
Text File  |  1991-06-22  |  12KB  |  347 lines

  1. MACROS.DOC
  2.  
  3. "The Macro Starter Kit" is shareware (c) copyright, 1991, by Chet Langin,
  4. Langin Software, 532 W. 3rd St., Centralia, IL  62801 USA.  CIS:  73770,615.
  5.  
  6. This is version 1.00.
  7.  
  8. Who may distribute this:
  9.  
  10. Any ASP vendor.
  11. Any BBS.  (The preferred filename is MACROS.ZIP.)
  12. Anyone for non-commercial reasons.
  13.  
  14. Others must obtain permission from Langin Software.  Permission will be
  15. granted to those who support registration fees for shareware authors.
  16. The registration fee is US $10.00.
  17.  
  18. "The Macro Starter Kit" is a collection of 19 macros for MS-DOS 5, which is
  19. required.  Each macro is described in this manual.  The macros are:
  20.  
  21.     format         mbeep          mclear         mdate
  22.     mdir           mfilelist      mfind          mformfeed
  23.     mhelp          mlinefeed      mlinefeed8     mmd
  24.     mmem           mparent        mprint         mroot
  25.     mtime          mtype          mwhereis
  26.  
  27. The Macro Starter Kit is for people who already have some experience in
  28. using DOS.  It is not for beginners.
  29.  
  30. Installation, and how to use this kit:
  31.  
  32. (1)  Print this file, so you can read it while you're working at your
  33. computer.
  34.  
  35. (2)  The following command should be in your AUTOEXEC.BAT file:
  36.  
  37.     doskey /bufsize=1024>nul
  38.  
  39. This needs to be in the AUTOEXEC.BAT file because the buffer size should
  40. only be set once.  Don't forget to reboot.
  41.  
  42. (3)  The macros are located in the MACROS.BAT file.  Copy this file to
  43. whatever directory you use to keep your batch files in.  Then, run it.
  44. The batch file will install the macros for you.
  45.  
  46. (4)  Refer to the following explanations of the macros as you try them.
  47. Some are easy, some are not.  To try a macro, simply enter the macro's
  48. name at the DOS prompt.  Look at the "Usage" for each macro, listed below,
  49. to see if parameters or switches are needed.  Some macros are extremely fast,
  50. and others take several seconds (be patient).
  51.  
  52. Note:  This kit is not intended to repeat the explanations of macros in the
  53. MS-DOS 5 manual.
  54.  
  55. (5)  Use the editor of your choice to change the MACROS.BAT file.  You have
  56. four options:
  57.  
  58.   A)  The macros you like, leave them.
  59.   B)  The macros you don't like, delete them.
  60.   C)  The macros you almost like, change them.
  61.   D)  Add your own macros to the file.
  62.  
  63. Beware:  The MACROS.BAT file contains "control characters," such as beep,
  64. formfeed, and linefeed characters.
  65.  
  66. (6)  Run the MACROS.BAT file, again, (and, again,) until you get it like you
  67. want it.  Each time you run it, the currently installed macros will be
  68. updated, if appropriate, to match the file.  If you add many macros, you
  69. may need to increase the buffer size (see Step 2, above).  If you are
  70. having trouble with a particular macro, put it in its own batch file to
  71. install and test it.  When it works, add it to the MACROS.BAT file.
  72.  
  73. (7)  When you have the MACROS.BAT file like you want it, add the following
  74. line to your AUTOEXEC.BAT file:
  75.  
  76.   call macros
  77.  
  78. This will run your batch file for you.  Don't forget to put this line in
  79. your AUTOEXEC.BAT file below the line specified in Step 2, above.
  80.  
  81. (8)  If you make it this far, send US $10.00 to Langin Software at the
  82. address at the top of this file.
  83.  
  84.  
  85. *************************************
  86. **  Individual Macro Explanations  **
  87. *************************************
  88.  
  89. Notes:
  90.  
  91.   The ^ character indicates a control character.  For example, ^L means
  92.   "control L", which is the character to send a formfeed to a printer.
  93.  
  94.   Each macro, except format, begins with an "m", for "macro".  This is so
  95.   the macro names should not conflict with utility and batch file names.
  96.  
  97.  
  98.  
  99. "format"
  100. --------
  101.  
  102.        doskey format=rem format is disabled
  103.  
  104.        Usage:  format <any parameters or switches>
  105.  
  106.        Disables the format command for unaware users.  When FORMAT is entered,
  107.        the macro enters "rem format is disabled" instead of doing a format.
  108.        To actually use the format command, begin it with a space, like this:
  109.        " format".  Then, DOS ignores the format macro and executes the actual
  110.        format command.
  111.  
  112. "mbeep"
  113. -------
  114.  
  115.        doskey mbeep=echo ^G
  116.  
  117.        Usage:  mbeep
  118.  
  119.        ^G is the "beep" character.  This macro echos ^G to the display, thus
  120.        causing a beep.
  121.  
  122. "mclear"
  123. --------
  124.  
  125.        doskey mclear=mode co80
  126.  
  127.        Usage:  mbeep
  128.  
  129.        "Mode co80" is a DOS command which resets the display to a color
  130.        80-column mode.  It clears the display while doing so.  Use this
  131.        when unpolite programs leave your display with 40 columns or
  132.        weird colors, or anytime when you want to clear clutter from your
  133.        display.
  134.  
  135. "mdate"
  136. -------
  137.  
  138.        doskey mdate=echo ^C$bdate
  139.  
  140.        Usage:  mdate
  141.  
  142.        Displays the date via the DOS DATE command.  Echoing ^C to the
  143.        DATE command interrupts the command when a new date is requested,
  144.        saving the user the effort of pressing <ENTER> to do this.  The
  145.        "$b" stands for the pipe character (|).  If this command were
  146.        entered from the DOS prompt, it would look like this:
  147.        "echo ^C|date".
  148.  
  149. "mdir"
  150. ------
  151.  
  152.        doskey mdir=dir $1/ad/on/p$tpause$tdir $1/a-d/on/p
  153.  
  154.        Usage:  mdir [drive:][path][filename]
  155.  
  156.        Displays a customized directory.  It is in three parts:  (1)  a
  157.        directory command which displays directories in alphabetical order;
  158.        (2) a pause; and, (3) a second directory command which displays files
  159.        in alphabetical order.  $1 is a variable which specifies the drive,
  160.        path, and filename, if any.  $t separates the commands.
  161.  
  162. "mfilelist"
  163. -----------
  164.  
  165.        doskey mfilelist=chkdsk \/v$bmore
  166.  
  167.        Usage:  mfilelist
  168.  
  169.        Displays a list of all of the files on a disk, including their
  170.        directories.
  171.  
  172. "mfind"
  173. -------
  174.  
  175.   doskey mfind=for %%x in ($2) do FIND $1 %%x $3$4$5$6$gtemp$ttype temp$bmore
  176.  
  177.        Usage:  mfind "string" [drive:][path]filename [/v][/c][/n][/i]
  178.  
  179.        The DOS find command does not use the * and ? wildcard characters.
  180.        But, this macro can change that.  $1 is a variable which contains
  181.        the string to search.  $2 is a variable which contains the drive
  182.        and path, if any, and the filename (including wildcards) of the
  183.        files to be searched.  $3, $4, $5, and $6 are variables which contain
  184.        the find switches, if any.  The macro is in two parts:  (1) searches
  185.        each file for the string, saving the output to a TEMP (for "temporary")
  186.        file; and, (2) the TEMP file is typed with the more filter.  $g is the
  187.        > redirection symbol.  $t separates the commands.  $b is the pipe
  188.        character, |.  Note:  The DOS manual shows the switches coming before
  189.        the string, but for the macro to work, the switches must come after
  190.        the string and the filename.
  191.  
  192. "mformfeed"
  193. -----------
  194.  
  195.        doskey mformfeed=echo ^L$gprn
  196.  
  197.        Usage:  mformfeed
  198.  
  199.        Sends a formfeed character, ^L, to the printer.  $g means the >
  200.        character.  From the DOS prompt, this command looks like this:
  201.        "echo ^L>prn".  Some people shorten "formfeed" to "ff".  However,
  202.        some people also shorten "file finder" to "ff".  So, "formfeed" is
  203.        spelled out to avoid a conflict.
  204.  
  205. "mhelp"
  206. -------
  207.  
  208.        doskey mhelp=doskey/macros
  209.  
  210.        Usage:  mhelp
  211.  
  212.        Displays a list of the currently active macros.
  213.  
  214. "mlinefeed"
  215. -----------
  216.  
  217.        doskey mlinefeed=echo ^J$gprn
  218.  
  219.        Sends a linefeed character, ^J, to the printer.  $g means the >
  220.        character.  From the DOS prompt, this command looks like this:
  221.        "echo ^J > prn".  Some people shorten "linefeed" to "lf".  Some
  222.        printers will not print a line of text because the "enter" character
  223.        has not been sent to the printer.  The mlinefeed macro will have
  224.        the line printed in these situations.
  225.  
  226. "mlinefeed8"
  227. ------------
  228.  
  229.        doskey mlinefeed8=for %%x in (x x x x x x x x) do echo ^J$gprn
  230.  
  231.        Usage:  mlinefeed8
  232.  
  233.        Sends eight line feeds to the printer via the for/in/do command.
  234.        %%x is a variable used just to count, and